最近工作上有用部屬到 saiku2.x 版本,因為網路資源太少,自己摸索的幾天,把這幾天的配置稍微記錄下來。
Java version: Java7
OS: Debian11
saiku-serve: 2.6.1
把上述兩份文件先放到 /tmp
目錄
pollochang@web-ap:~$ ls /tmp/
jdk-7u80-linux-x64.tar.gz saiku-server-2.6.1-SNAPSHOT.tar.gz
sudo groupadd -g 1500 saiku
sudo useradd -u 1500 -g 1500 -d /home/saiku -s /bin/bash saiku
sudo mkdir -p /home/saiku
sudo chown saiku:saiku /home/saiku/
sudo mkdir -p /usr/local/lib/jvm
sudo tar -C /usr/local/lib/jvm -zxf /tmp/jdk-7u80-linux-x64.tar.gz
ls /usr/local/lib/jvm # 檢查
sudo su saiku -c "tar -C /home/saiku/ -zxf /tmp/saiku-server-2.6.1-SNAPSHOT.tar.gz"
/var/log
這部份不一定要做,如果是使用 RedHat 系列的發行板建議做一下,主要為了日後有用到 logrotate
有可能會因為 SELinux 無法正常執行。
sudo rm -rf /home/saiku/saiku-server/tomcat/logs
sudo mkdir -p /var/log/saiku
sudo chown saiku:saiku /var/log/saiku
sudo su saiku -c "ln -s /var/log/saiku /home/saiku/saiku-server/tomcat/logs"
sudo chmod +x /home/saiku/saiku-server/*.sh
sudo chmod +x /home/saiku/saiku-server/tomcat/bin/*.sh
# Systemd unit file for saiku
[Unit]
Description=saiku
After=syslog.target network.target
[Service]
Type=forking
Environment=JAVA_HOME=/usr/local/lib/jvm/jdk1.7.0_80
Environment=CATALINA_OPTS="-Dext.prop.dir=file:/home/saiku/saiku-server/tomcat/webapps/saiku/WEB-INF/ -Xms256m -Xmx768m -XX:MaxPermSize=256m -Dfile.encoding=UTF-8 -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true -Djava.awt.headless=true"
Environment=CATALINA_PID=/home/saiku/saiku-server/saiku.pid
ExecStart=/home/saiku/saiku-server/start-saiku.sh
ExecStop=/bin/kill -15 $MAINPID
User=saiku
Group=saiku
UMask=0007
RestartSec=10
Restart=always
[Install]
WantedBy=multi-user.target
sudo systemctl start saiku
http://[your ip]:8080/
sudo tail -f /var/log/saiku/catalina.out
sudo tail -f /var/log/saiku/saiku.log
Where to download old version 2.6.x of Saiku